﻿<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ include file="/WEB-INF/view/common/taglibs.jsp"%>

<!DOCTYPE>
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta name="renderer" content="webkit">
    <meta charset="utf-8">
    
    <title>分配角色</title>
    
    <%@ include file="/WEB-INF/view/common/common.jsp"%>
    <script type="text/javascript" src="${_cdnStaticResourcesPath}/resources/js/sys/user/assign_role.js"></script>
</head>
<body>
    <article class="page-container">
        <form action="${ctx}/user/assignRole" method="post" class="form form-horizontal" id="form-user-assign_role">
            <!-- 存放用户id -->
            <input type="hidden" id="userId" name="userId" value="${userId}"/>
            
            <div class="row cl">
                <label class="form-label col-xs-4 col-sm-3">用户名：</label>
                <div class="formControls col-xs-8 col-sm-6">
                    <span class="select-box">${userName}</span> 
                </div>
            </div>
            <div class="row cl">
                <label class="form-label col-xs-4 col-sm-3">所属系统：</label>
                <div class="formControls col-xs-8 col-sm-6">
                    <span class="select-box">
	                    <select class="select" id="appId" name="appId">
	                        <c:forEach items="${allApp}" var="a">
	                            <option value="${a.id}">${a.name}</option>
	                        </c:forEach>
	                    </select>
                    </span> 
                </div>
            </div>
            <div class="row cl">
                <label class="form-label col-xs-8 col-sm-1">&nbsp;</label>
                <div class="formControls col-xs-8 col-sm-10" id="roleDiv" style="text-align: center;">
                    <img src="${_cdnStaticResourcesPath}/resources/images/loading.gif"/><span style=""margin-left:5px;vertical-align:middle;'>角色列表加载中...</span>
                </div>
                <!-- 存储临时角色列表数据 -->
                <div id="roleDivTemp" style="display: none;"></div>
            </div>
            <div class="row cl">
                <div class="col-xs-8 col-sm-5 col-xs-offset-4 col-sm-offset-5 mt-50">
                    <input class="btn btn-primary radius" type="submit" value="&nbsp;&nbsp;提交&nbsp;&nbsp;">
                </div>
            </div>
        </form>
    </article>
    
    <!--请在下方写此页面业务相关的脚本--> 
    <script type="text/javascript" src="${_cdnStaticResourcesPath}/resources/lib/jquery.validation/1.14.0/jquery.validate.js"></script> 
    <script type="text/javascript" src="${_cdnStaticResourcesPath}/resources/lib/jquery.validation/1.14.0/validate-methods.js"></script> 
    <script type="text/javascript" src="${_cdnStaticResourcesPath}/resources/lib/jquery.validation/1.14.0/messages_zh.js"></script>
    
    <input type="hidden" des="静态资源服务器地址" name="cdnStaticResourcesPath" id="cdnStaticResourcesPath" value="${_cdnStaticResourcesPath}" />
    <input type="hidden" des="获取应用对应的角色列表url" id="getAppRoleListUrl" value="${ctx}/app/role/list"/>
    
</body>
</html>
